<%@ page contentType="text/html; charset=utf-8"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>读卡实例</title>

</head>
<body>


<br/><br/><br/><br/><br/><br/><br/><br/><br/>        
                
<div id="form1">
    <table align="center" >
      
        <tr>
            <td></td>
            <td>
                <input value="读卡" type="button" onclick="submitForm()"  />
                
                
                
                
            </td>
        </tr>
    </table>
</div>



<script type="text/javascript">
       

        function submitForm() {
             try
             {
             	 var obj= new ActiveXObject("NjPublic.TRunPub");
             	alert("控件")
	  			 var res = obj.ReadCardA("1");
	   			 alert("您的卡号为："+	res);
	   		 }catch(e)
	   		 {
	   		 	alert("控件未注册或未找到读卡器！")
	   		 }
        }

    </script>
</body>
</html>